import request from '/@/utils/request';

/**
 * 人才api接口集合
 */
export function useCrmTalentApi() {
  return {
    // 分页获取人才
    getPageList(data: object) {
      return request({
        url: '/system/crmTalent/getPageList',
        method: 'post',
        data: data
      })
    },
    // 查询人才详细
    getCrmTalentById(id: number) {
      return request({
        url: '/system/crmTalent/' + id,
        method: 'get'
      })
    },
    getCrmTalentDetailById(id: number) {
      return request({
        url: '/system/crmTalent/detail/' + id,
        method: 'get'
      })
    },
    // 新增人才
    createCrmTalent(data: object) {
      return request({
        url: '/system/crmTalent/createCrmTalent',
        method: 'post',
        data: data
      })
    },
    // 修改人才
    updateCrmTalent(data: object) {
      return request({
        url: '/system/crmTalent/updateCrmTalent',
        method: 'post',
        data: data
      })
    },
    // 删除人才
    deleteCrmTalent(id: number) {
      return request({
        url: '/system/crmTalent/' + id,
        method: 'delete'
      })
    },
  }
}